//
// Created by jsjxsy on 2022/8/18.
//
#include <iostream>
using namespace std;
int main() {
  int pop2 = 2000;
  cout<< "pop2="<<pop2<<endl;
  const int *p = &pop2;//不能修改pop2的值
  //去掉指针不能修改值的特性
  int *pt = const_cast<int *>(p);
  *pt += 2;
  cout<< "pop2="<<pop2<<endl;


  int b = 1, c = 22;
  int* const d = &b;//top const 不能修改地址
   //d = &c;
  int* p2 = const_cast<int *>(d);
  p2 = &c;
  cout << "d: " << *d<<" p2: "<<*p2;
  return 0;
}
